#ifndef PCAP_PARSER_H
#define PCAP_PARSER_H

typedef struct PcapS PcapT;
typedef struct PcapPacketS PcapPacketT;

/*
*
*     +----------------------------------------------+
*     |          Time stamp, seconds value           |
*     +----------------------------------------------+
*     |Time stamp, microseconds or nanoseconds value |
*     +----------------------------------------------+
*     |       Length of captured packet data         |
*     +----------------------------------------------+
*     |   Un-truncated length of the packet data     |
*     +----------------------------------------------+
*
*/

struct PcapPacketS
{
    uint32_t timeSec; 
    uint32_t timeMs;
    uint32_t len;
    uint32_t unTruncatedLen;
    uint8_t *data;
	
};

#ifdef __cplusplus
extern "C"
{
#endif

PcapT *PcapCreate(const char *path);

int PcapFetchPacket(PcapT *pcap, PcapPacketT **pPacket);

void PcapDestroy(PcapT *pcap);

#ifdef __cplusplus
}
#endif

#endif
